package controller;

import POJO.People;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j //lombok 日志
public class HelloController {
    @RequestMapping("/hello")
    public String hello(@RequestParam(required = false,value = "name") Long name){
        log.info("测试 /hello 请求。"); //lombok
        return "WSInterface, Jenkins! ," + name;
    }

    @Autowired
    People people;

    @RequestMapping("/people")
    public People people(){
        return people;
    }
}
